<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_channel.*" %> 
<%@ page import="com.lmpop.trade.tb_commpara.Tb_commparaInfo"%>	
<%@page import="java.util.*" %>
<html>
  <head>
    
    <title>修改栏目</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
     <link href="/program/admin/index/css/thickbox.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="/js/jquery.js"></script>
	<script type="text/javascript" src="/js/thickbox.js"></script>
	<script type="text/javascript" src="channel.js">
		
	</script>
	<script type="text/javascript" src="/program/admin/js/judgment.js" charset="UTF-8"></script>
	
	
</head>

<body>

  <% 
  	String ch_id="";
  	if(request.getParameter("ch_id")!=null) ch_id = request.getParameter("ch_id");	
  	Ti_channelInfo ti_channelInfo = new Ti_channelInfo();
  	List list = ti_channelInfo.getListByPk(ch_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String ch_name="",up_ch_id="",ch_level="",save_dir="",default_page="",index_temp="",sort="",list_temp="",article_temp="",remark="",in_date="",ch_model="";
	String web_id="",out_link="",meta_keyword="",meta_desc="";
	if(map.get("web_id")!=null) web_id = map.get("web_id").toString();
	if(map.get("meta_keyword")!=null) meta_keyword = map.get("meta_keyword").toString();
	if(map.get("meta_desc")!=null) meta_desc = map.get("meta_desc").toString();
	if(map.get("out_link")!=null) out_link = map.get("out_link").toString();
  	if(map.get("ch_name")!=null) ch_name = map.get("ch_name").toString();
  	if(map.get("up_ch_id")!=null) up_ch_id = map.get("up_ch_id").toString();
  	if(map.get("ch_level")!=null) ch_level = map.get("ch_level").toString();
  	if(map.get("save_dir")!=null) save_dir = map.get("save_dir").toString();
 
  	if(map.get("sort")!=null) sort = map.get("sort").toString();
  	if(map.get("default_page")!=null) default_page = map.get("default_page").toString();
  	if(map.get("index_temp")!=null) index_temp = map.get("index_temp").toString();
  	if(map.get("list_temp")!=null) list_temp = map.get("list_temp").toString();
  	if(map.get("article_temp")!=null) article_temp = map.get("article_temp").toString();
  	if(map.get("remark")!=null) remark = map.get("remark").toString();
 
  	if(map.get("ch_model")!=null) ch_model = map.get("ch_model").toString();
  	if(map.get("in_date")!=null) in_date = map.get("in_date").toString();


String up_ch_name="";
	if(!up_ch_id.equals("")){
	up_ch_name = ti_channelInfo.getChName(up_ch_id);
		}
	if(up_ch_name.equals("")){
		up_ch_name="无上级栏目";
	}


Tb_commparaInfo compara = new Tb_commparaInfo();
	String modelSelect = compara.getSelectItem("24",ch_model);
	
	
	
	String ch_namex = "";
	if(request.getParameter("ch_namex")!=null && !request.getParameter("ch_namex").equals("")){
		ch_namex = request.getParameter("ch_namex");
	   }
	String iStart = "0";
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	String para ="/program/admin/channel/index.jsp?up_ch_id=" + up_ch_id +"&ch_namex="+ch_namex+"&iStart="+Integer.parseInt(iStart);


	if(request.getParameter("index_temp") !=null)
		index_temp=request.getParameter("index_temp") ;

  %>
	
	<h1>修改栏目</h1>
	<form action="/doTradeReg.do" method="post" name="addForm" id="addForm" target="_self">
		<input name="ch_id" id="ch_id" type="hidden" value="<%=ch_id%>"/>
		<input name="web_id" id="web_id" type="hidden" value="<%=web_id%>"/>
		<input name="ch_level" type="hidden" id="ch_level" maxlength="20" value="<%=ch_level%>"/>
		
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
 
		
		<tr>
			<td align="right" width="15%">
				栏目名称<font color="red">*</font>
			</td>
			<td colspan="3">
			<input name="ch_name" id="ch_name" value="<%=ch_name%>" maxLength="30" size="50" type="text" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this) "/></td>		
		</tr>
		
		<tr>
	     <td  align="right" width="15%">
					默认页面:
				</td>
				<td align="left" width="21%">
				<input name="default_page" id="default_page" type="text" value="<%=default_page%>" maxLength="20" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this) " /></td>
				<td align="right" width="10%">
					栏目标识:
				</td align="left" width="21%">
				<td><%=ch_id%></td>
			</tr>
 
			
		   <tr>
				<td align="right" width="15%">
					栏目级别:
				</td>
				 <td align="left" width="21%"><%=ch_level%></td>		 
					<td align="right" width="10%">
					显示顺序:
					</td>
				<td><input name="sort" id="sort" type="text" value="<%=sort%>" style="width:80px;" maxlength="4" onKeyUp="if(!/^\d+(\.\d+)?$/.test(this.value))this.value=''">(由低 -> 高)</td>
			</tr>
				
		 <tr>
			<td align="right" width="15%">
				上级栏目:
			</td>
			<td align="left" width="21%" colspan="3">
				<%=up_ch_name%>
		  	<input name="up_ch_id" type="hidden" id="up_ch_id" value="<%=up_ch_id%>" />
			</td>
 
		</tr>
		<tr>
			<td align="right" width="15%">
				生成文件保存路径:
			</td>
			<td colspan="3">
				<input name="save_dir" type="text" id="save_dir" value="<%=save_dir%>" size="50" maxlength="100" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this) " />
				<input name="dir" type="hidden" id="dir" size="30" maxlength="100" />
				<input name="save_dir_cc" type="hidden" id="save_dir_cc" value="<%=save_dir%>" />
				<input name="save_dir_again" type="hidden" id="save_dir_again" value="" />
			</td>
		</tr>
		
		<tr>
			<td align="right" width="15%">
				首页模板路径:
			</td>
			<td colspan="3">
			<input type="text" id="index_temp" name="index_temp" value="<%=index_temp%>" size="50" maxlength="100" readonly="readonly">
			<input type="button" onClick="choiceFile('update','<%=ch_id %>')" value="浏览"/>			
				</td>
		</tr>
		
		<tr>
			<td align="right" width="15%">
				外部链接:
			</td>
			<td colspan="3">
				<input type="text" name="out_link" id="out_link" value="<%=out_link%>" size="50" maxlength="100" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this) " />
			</td>
		</tr>
		
		<tr>
			<td align="right" width="16%">
				关键字:
			</td>
			<td colspan="3"><input type="text" name="meta_keyword" id="meta_keyword" value="<%=meta_keyword%>" size="50" maxlength="100" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this) "></td>
		</tr>

		<tr>
			<td align="right" width="16%">
				描述概括:
			</td>
			<td colspan="3"><textarea name="meta_desc" id="meta_desc" rows="3" cols="40" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this) "><%=meta_keyword%></textarea></td>
		</tr>			
		
		<tr>
			<td align="right" width="15%">
				备注:
			</td>
			<td colspan="3"><input name="remark" id="remark" size="50" maxLength="50" value="<%=remark%>" type="text" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this) "/></td>
			</tr>
	</table>
	
	<table width="70%" cellpadding="1" cellspacing="1" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="4112" />
				<input type="hidden" name="jumpurl" value="<%=para%>" />
				<input class="buttoncss" type="submit" name="tradeSub" value="提交" onClick="return chekedinfo()"/>&nbsp;&nbsp;
				<input class="buttoncss" type="button" name="tradeRut" value="返回" onClick="window.location.href='<%=para%>';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
